<?php
/**
 * SocialSalary index page for web-based applications
 *
 * Coded by Jonathan Gorard, 2012
 *
 * @package SocialSalary
 * @subpackage Core
 */

/**
 * Start the SocialSalary engine
 */
require_once(dirname(__FILE__) . "/engine/start.php");

socialsalary_set_context('main');

// allow plugins to override the front page (return true to stop this front page code)
if (socialsalary_trigger_plugin_hook('index', 'system', null, FALSE) != FALSE) {
	exit;
}

if (socialsalary_is_logged_in()) {
	forward('activity');
}


$content = socialsalary_view_title(socialsalary_echo('content:latest'));
$content .= socialsalary_list_river();

$login_box = socialsalary_view('core/account/login_box');

$params = array(
		'content' => $content,
		'sidebar' => $login_box
);
$body = socialsalary_view_layout('one_sidebar', $params);
echo socialsalary_view_page(null, $body);
